{extend name="Public:content"}
{block name="content"}
<form class="form-horizontal m-t" id="integralRechargeForm"  method="post" action='{:url("$classuri/integralRecharge")}'>
    <div class="form-group">
        <label class="col-sm-2 control-label">用户名：</label>
        <div class="col-sm-8">
            <input readonly="readonly" disabled="disabled" value='{$vo.username}' required="required" class="form-control">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">现有积分：</label>
        <div class="col-sm-8">
            <input readonly="readonly" disabled="disabled" value='{$vo.integral}' required="required" class="form-control">
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">充值积分：</label>
        <div class="col-sm-8">
            <input type="tel" autofocus name="integral" required="required" number="true" title="请正确输入充值积分" placeholder="请输入充值积分" class="form-control">
        </div>
    </div>
    <div class="hr-line-dashed"></div>
    <div class="form-group">
        <div class="col-sm-12 text-center">
            {if isset($vo['id'])}<input type='hidden' value='{$vo.id}' name='id'/>{/if}
            <button class="btn btn-primary" type="submit">保存数据</button>
            <button class="btn btn-primary btn-danger" type='button' data-confirm="确定要取消编辑吗？" onclick="$.Oa.confirm(this)">取消编辑</button>
        </div>
    </div>
</form>
{/block}
{block name="script"}
<script type="text/javascript">
    //表单提交
    $('#integralRechargeForm').validate({
        submitHandler: function(form) {
            $.Oa.doHform('#integralRechargeForm',false,false,function(data){
                parent.layer.msg(data.msg);
                var iframe ='{$iframe}';
                var n = parent.$("iframe[name='"+iframe+"']").index();
                if(n == 0){
                    $('#member_table').bootstrapTable('refresh');
                }else{
                    parent[n].$('#member_table').bootstrapTable('refresh');
                }
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
            })
        }
    })
</script>
{/block}

